#!/bin/sh
# filename: ddoctype
# description: create doctype

#     Copyright © 2012-2013 Toan Nguyen <toan.nguyen@monash.edu> 
#
#     This file is part of Xglom.
# 
#     This is free software: you can redistribute it and/or modify
#     it under the terms of the GNU General Public License as published by
#     the Free Software Foundation, either version 3 of the License, or
#     (at your option) any later version.
# 
#     This is distributed in the hope that it will be useful,
#     but WITHOUT ANY WARRANTY; without even the implied warranty of
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#     GNU General Public License for more details.
# 
#     You should have received a copy of the GNU General Public License
#     along with this program.  If not, see <http://www.gnu.org/licenses/>.

. dcheck

doctype=":create true :type mbi.tiff.series \
	:description mbi.tiff.series \
	:definition < \
		:element -name number_of_images -type long -max-occurs 1 < \
               	:description Total number of images > \
		:element -name image_height -type long < \
               	:description image height > \
		:element -name image_width -type long < \
               	:description image width > \
		:element -name no_tiles_ver -type long < \
               	:description number of tiles in vertical direction > \
		:element -name no_tiles_hoz -type long < \
               	:description number of tiles in horizontal direction > \
        :element -name physical_unit -type document < \
               	:description physical unit  \
        :element -name dx -type double < \
           		:description dx > \
        :element -name dy -type double < \
           		:description dy > \
        :element -name dz -type double < \
           		:description dz > \
			> \
            	:element -name others -type document -min-occurs 0 < \
                	:description others
                	:element -name bzero -type double -min-occurs 0 < \
                    		:description bzero > \
                	:element -name bscale -type double -min-occurs 0 < \
                    		:description New element description > \
                	:element -name bunit -type double -min-occurs 0 < \
                    		:description bunit > \
			> \
		>"

#echo ${doctype}
$MFCOMMAND asset.doc.type.update ${doctype}
